#define LED0      5    /* LED0 use GPB5 */
#define LED1      6    /* LED1 use GPB6 */
#define LED2      7    /* LED2 use GPB7 */
#define LED3      8    /* LED3 use GPB8 */

#define KEY0      0    /* KEY0 use GPG0 */
#define KEY1      3    /* KEY1 use GPG3 */
#define KEY2      5    /* KEY2 use GPG5 */
#define KEY3      6    /* KEY3 use GPG6 */
#define KEY4      7    /* KEY4 use GPG7 */
#define KEY5      11   /* KEY5 use GPG11 */

#define KEY0_INT  8    /* key0 interrupt number */
#define KEY1_INT  11   /* key1 interrupt number */
#define KEY2_INT  13   /* key2 interrupt number */
#define KEY3_INT  14   /* key3 interrupt number */
#define KEY4_INT  15   /* key4 interrupt number */
#define KEY5_INT  19   /* key5 interrupt number */

#define INIT_LED(n)  (0x01 << (n) * 2)

#define LED_ON(n)    GPBDAT &= ~(0x01<<(n))
#define LED_OFF(n)   GPBDAT |= 0x01<<(n)

#define SET_KEY_INTR(n)   (0x02 << (n) * 2) 
#define EINT_ON(n)   (~(0x01 << (n)))
